import { RoleMenus } from '@/service/common'
import { ActionTree } from "vuex";
import { State } from './state'


const actions: ActionTree<State, any> = {
  getMenus({ commit }) {
    return RoleMenus().then((res: any) => {
      commit('SET_MEUNS', res.data);
    })
  },
  //getMenus({ commit, state: States }, data: any[]) {
  //  return RoleMenus().then((res: any) => {
  //  commit('SET_MEUNS', res.data);
  // })
  // },

}

export default actions
